package xyz.xtt.equity.service;

import java.util.List;

import com.baomidou.mybatisplus.extension.service.IService;

import xyz.xtt.equity.client.request.SendDeliverResultRequest;
import xyz.xtt.equity.entity.TblAssetEntitlementDeliver;

/**
 * <p>
 * 资产权益兑换表 服务类
 * </p>
 *
 * @author author
 * @since 2024-12-27
 */
public interface ITblAssetEntitlementDeliverService extends IService<TblAssetEntitlementDeliver> {
	/**
	 * 查询兑换详情
	 * 
	 * @param entitlementId
	 * @return
	 */
	TblAssetEntitlementDeliver info(Long entitlementId);

	TblAssetEntitlementDeliver info(Long entitlementId, String uid);

	/**
	 * 更新还是插入
	 * 
	 * @param deliver
	 * @param retry
	 * @return
	 */
	boolean saveOrUpdateByDeliver(TblAssetEntitlementDeliver deliver, boolean retry);

	/**
	 * @param suitAssetId
	 * @param suitEntitlementId
	 * @param uid
	 * @return
	 */
	TblAssetEntitlementDeliver deliver(Long suitAssetId, Long suitEntitlementId, Long uid);

	/**
	 * 权益竞换
	 * 
	 * @param suitEntitlementId
	 * @param uid
	 * @return
	 */
	TblAssetEntitlementDeliver deliver(Long suitEntitlementId, Long uid);

	/**
	 * @param assetId
	 * @param userId
	 * @return
	 */
	List<Long> getAssetEntitlementDeliver(Long assetId, Long userId);

	/**
	 * @param uid
	 * @param id
	 * @param gender
	 * @param assetId
	 * @return
	 */
	Boolean exchangeWorkEx(Long uid, Long id, Integer gender, Long assetId);

	boolean checkDeliverSucc(Long entitlementId, Long uid);

	Boolean deliverCheck(Long entitlementId, Long uid);

	Boolean saveDeliverResult(SendDeliverResultRequest request);

}
